package com.luoye.lj.platform.controller.log;


import com.luoye.lj.util.mvc.log.DescriptionGeneratorAdapter;

import java.util.Map;

/**
 * Created by wuhao on 16-3-28.
 *
 * 执行了操作【系统级别的角色添加】,参数是：{"rolename":["sdfsd"],"description":["sdfsdf"],
 * "_csrf":["0bb9ec71-ce5a-4f31-aa1f-7a0632075941"],"roletype":["0"],"id":["-1"],"authstr":["1#"]}
 */
public class RoleAddGenerator extends DescriptionGeneratorAdapter {
    @Override
    public String generate(String name, Map parameterMap) {
        String str = "";
        String rolename = ((String[]) parameterMap.get("rolename"))[0];
        String description = ((String[]) parameterMap.get("description"))[0];
        String roletype = ((String[]) parameterMap.get("roletype"))[0];
        String id = ((String[]) parameterMap.get("id"))[0];
        String authstr = ((String[]) parameterMap.get("authstr"))[0];
        str += "新增了角色，角色名【" + rolename + "】，描述【"
                + description + "】，角色类型【" + roletype + "】，权限【" + authstr + "】";
        return str;

    }
}
